package com.xuzimian.globaldemo.spring.core.aop.test;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * 测试 test 分支修改
 */
@Configuration
@EnableAspectJAutoProxy
public class SpringAopDemo {


    //我是主干上的修改

    @Test
    public void testNoArgs() {
        ApplicationContext ctx = new AnnotationConfigApplicationContext("com.xuzimian.globaldemo.spring.core.aop" +
                ".test");

        PointCutNoArgService service = (PointCutNoArgService) ctx.getBean("pointCutNoArgService");
        service.add("add1", "add2");
        System.out.println("---------------------------------");
        service.edit("edit1", "edit2");
        System.out.println("---------------------------------");
        service.delete("delete1", "delete2");
        System.out.println("---------------------------------");
    }

}
